using Microsoft.EntityFrameworkCore;
using myWebApi.Domian;
var builder = WebApplication.CreateBuilder(args);
var a = builder.Configuration.GetconnctionString("mysql");
builder.Servers.AddDbContext<StudentDbContext>(
    s => { b.useMysql(a, ServerVerstion.AutoDetect(a))}
)
// 添加控制
builder.Servers.AddControllers();
var app = builder.Build();
builder.Servers.AddSocped(typeof(IRepository<T>), typeof(EFRepository<T>));
app.MapController();
app.Run();

